package com.lei2j.dubbo.service;

import com.lei2j.dubbo.pojo.ValidateParams;

import javax.validation.GroupSequence;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * author: 98611
 * date: 2019/7/7
 */
public interface ValidateService {
    @interface Save{}//与方法名同名，首字母大写，用于区分验证场景
    ValidateParams save(ValidateParams validateParams);
    @GroupSequence(value = {Save.class})
    @interface Update{}
    ValidateParams update(ValidateParams validateParams);

    ValidateParams validateObject(@NotNull ValidateParams validateParams);

    void validateParam(@Min(10)int len);
}
